<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var styls = (function () {
            var start = 13
            var styre = 0
            return {
                mobile: function (n) {
                    if (n <= 3) {
                        styre = start
                    } else {
                        styre = (n - 3) * 5 + start
                    }
                    return styre
                },
                yd: function (flag) {
                    return flag ? styre + 10 : styre
                }
            }
        })()
        console.log(styls.mobile(5));
        console.log(styls.yd(false));
    </script>
</body>

</html>